import random

from django.db import models
from django.contrib.auth.models import AbstractUser


def default_sign():
    signs = ["一颗小虎牙", "一只鲨鱼酱", "且随疾风前行", "落叶亦需归根"]
    return random.choice(signs)


class User(AbstractUser):
    avatar = models.FileField(upload_to='avatar', default='')
    nickname = models.CharField("昵称", max_length=20, default="昵称")
    sign = models.CharField("个人签名", max_length=50, default=default_sign)
    info = models.CharField("个人描述", max_length=150, default="")
